package cn.duli.myvideo.service.Impl;

import cn.duli.myvideo.mapper.VarietyCommentMapper;
import cn.duli.myvideo.pojo.VarietyComment;
import cn.duli.myvideo.service.VarietyCOmmentService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class VarietyCommentServiceImpl implements VarietyCOmmentService {

    @Resource
    public VarietyCommentMapper varietyCommentMapper;

    @Override
    public Page<VarietyComment> findAll() {
        return varietyCommentMapper.findAll();
    }

    @Override
    public List<VarietyComment> findByUserId(Integer uId) {
        return varietyCommentMapper.findByUserId(uId);
    }

    @Override
    public List<VarietyComment> findByVarietyId(Integer vId) {
        return varietyCommentMapper.findByVarietyId(vId);
    }

    @Override
    public void save(VarietyComment varietyComment) {
        varietyCommentMapper.save(varietyComment);
    }

    @Override
    public void deleteById(Integer vcId) {
        varietyCommentMapper.deleteById(vcId);
    }
}
